#ifndef KEYCOUNTSERVER_SERVER_H_
#define KEYCOUNTSERVER_SERVER_H_

#include <set>

namespace KeyCountServer {

class Server : public ahxgwnet::Runnable
{
public:
    Server();
    ~Server();
    bool start();
    bool wait();
    void run(Thread *thread, void *arg);
    
private:
    Client *getClient();
    
public:
    std::set<std::string> m_onlineList;
    ThreadMutex *m_mutex;

private:
    Socket  *m_socket;
    Thread  *m_thread;
    Client  *m_client[MAX_THREAD];
    int     m_select;
};

}

#endif
